<?php
$this->breadcrumbs=array(
	'综合控制台'=>array($this->pre_module_url.'/index/index'),
	'产品管理'=>array($this->pre_module_url.'/productSale/admin'),
	'分类管理'=>array($this->pre_module_url.'/category/admin'),
	'编辑分类'
);
?>

<div class="hr_15"></div>

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'category-form',
	'enableAjaxValidation'=>false,
	'enableClientValidation'=>true,
)); ?>
<ul class="form_list form_list2">

	<li class="c_f">
		<span class="tit">分类标题：</span>
		<div class="cont f_l">
			<?php echo $form->textField($model,'zca_title',array('size'=>20,'maxlength'=>20,'class'=>'t_ipt ipt_bg w_250')); ?>
			<?php echo $form->error($model,'zca_title')?>
		</div>
	</li>
	<?php if($model->zca_level<2){?>
	<li class="c_f">
		<span class="tit">分类图标：</span>
		<div class="cont f_l">
			<div class="c_img c_img50 uploadimg">
			    <img id="img1" src="<?php if(!empty($model->attachment)){echo $model->attachment->zat_url;}else{echo "/images/pro_img.jpg";}?>" alt="" />
			</div>
			<p class="mt10">
			    <?php echo CHtml::link(empty($model->attachment)?'上传图片<b class="mem_bgx left"></b><b class="mem_bgx right"></b>'.CHtml::fileField('image','',array('id'=>'uploadimg1','multiple'=>true)):'上传图片<b class="mem_bgx left"></b><b class="mem_bgx right"></b>'.CHtml::fileField('image','',array('id'=>'uploadimg1','multiple'=>true)),'javascript:',array('class'=>'mem_bgx link_btn filelink','onclick'=>"uploadimg('1')"))?>
			    <?php if(!empty($model->attachment)) echo CHtml::link('删除图片<b class="mem_bgx left"></b><b class="mem_bgx right"></b>','javascript:',array('class'=>"mem_bgx link_btn filelink del ",'onclick'=>"removeimg('1')"))?>
				<?php echo $form->hiddenField($model,'zta_id',array('id'=>'proimgid1'))?>  
			    <?php echo CHtml::hiddenField("pic_url",!empty($model->attachment)?$model->attachment->zat_url:"",array('id'=>'proimage1'))?>  
			</p>  
			<script src="<?php echo Yii::app()->baseUrl;?>/js/upload_img.js"></script>
		</div>
	</li>
	<?php }?>
	<li class="c_f">
		<span class="tit">SEO标题：</span>
		<div class="cont f_l">
			<?php echo $form->textField($model,'zca_seotitle',array('size'=>20,'maxlength'=>20,'class'=>'t_ipt ipt_bg w_250')); ?>
			<?php echo $form->error($model,'zca_seotitle')?>
		</div>
	</li>
	<li class="c_f">
		<span class="tit">SEO关键字：</span>
		<div class="cont f_l">
			<?php echo $form->textField($model,'zca_seokey',array('size'=>20,'maxlength'=>20,'class'=>'t_ipt ipt_bg w_250')); ?>
			<?php echo $form->error($model,'zca_seokey')?>
		</div>
	</li>
	
	<li class="c_f">
		<span class="tit">SEO描述：</span>
		<div class="cont f_l">
			<?php echo $form->textField($model,'zca_seodesc',array('size'=>20,'maxlength'=>20,'class'=>'t_ipt ipt_bg w_250')); ?>
			<?php echo $form->error($model,'zca_seodesc')?>
		</div>
	</li>
	
	<li class="c_f d_n">
		<span class="tit">规格模型：</span>
		<div class="cont f_l">
			<?php echo $form->dropDownList($model,'zmd_id',AttMod::model()->getMod(),array('class'=>'s_ipt w_250')); ?>
			<?php echo $form->error($model,'zmd_id')?>
		</div>
	</li>
	
	<li class="c_f">
		<span class="tit">描述：</span>
		<div class="cont f_l">
			<?php echo $form->textArea($model,'zca_desc',array('rows'=>5,'cols'=>80)); ?>
			<?php echo $form->error($model,'zca_desc')?>
		</div>
	</li>

	<li class="c_f"><span class="tit">&nbsp;</span>
		<div class="cont f_l">
			<?php echo CHtml::submitButton(Yii::t('adm','Save Date'),array('class'=>'mem_btn mem_btn20 mr5')); ?>
		</div>
	</li>
<?php $this->endWidget(); ?>
